import request from '@/utils/request'

// 查询生产任务图纸列表
export function listDrawing(query) {
  return request({
    url: '/mes/pro/protaskdrawing/list',
    method: 'get',
    params: query
  })
}

// 查询生产任务图纸详细
export function getDrawing(recordId) {
  return request({
    url: '/mes/pro/protaskdrawing/' + recordId,
    method: 'get'
  })
}

// 新增生产任务图纸
export function addDrawing(data) {
  return request({
    url: '/mes/pro/protaskdrawing',
    method: 'post',
    data: data
  })
}

// 修改生产任务图纸
export function updateDrawing(data) {
  return request({
    url: '/mes/pro/protaskdrawing',
    method: 'put',
    data: data
  })
}

// 删除生产任务图纸
export function delDrawing(recordId) {
  return request({
    url: '/mes/pro/protaskdrawing/' + recordId,
    method: 'delete'
  })
}

// 查询生产任务图纸列表
export function getList(query) {
  return request({
    url: '/mes/pro/protaskdrawing/getList',
    method: 'get',
    params: query
  })
}
